org.eclipse.vtp.framework.common
Interface IArrayObject

All Superinterfaces:
IDataObject

public interface IArrayObject
extends IDataObject

Represents a dynamic sequence of other data objects.

Author:
Lonnie Pryor

Field Summary
static java.lang.String FIELD_NAME_LENGTH
          The name of the length field.
static java.lang.String TYPE_NAME
          The name of the array type.
 
Method Summary
 void addElement(IDataObject item)
          Adds an item to the end of this array.
 IDataObject getElement(int index)
          Returns the item at the specified index in this array.
 INumberObject getLength()
          Returns the length field of this array object.
 void insertElement(int index, IDataObject item)
          Inserts an item at the specified index in this array.
 void removeElement(int index)
          Removes the item at the specified index in this array.
 void setElement(int index, IDataObject item)
          Sets the item at the specified index in this array.
 
Methods inherited from interface org.eclipse.vtp.framework.common.IDataObject
getField, getType, isEqualTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isReadOnly, setField, toString
 

Field Detail

TYPE_NAME

static final java.lang.String TYPE_NAME
The name of the array type.

See Also:
Constant Field Values

FIELD_NAME_LENGTH

static final java.lang.String FIELD_NAME_LENGTH
The name of the length field.

See Also:
Constant Field Values
Method Detail

getLength

INumberObject getLength()
Returns the length field of this array object.

Returns:
The length field of this array object.

getElement

IDataObject getElement(int index)
                       throws java.lang.IndexOutOfBoundsException
Returns the item at the specified index in this array.

Parameters:
index - The index of the item to return.
Returns:
The item at the specified index in this array.
Throws:
java.lang.IndexOutOfBoundsException - If the specified index is less than zero or greater than or equal to the length of this array.

addElement

void addElement(IDataObject item)
                throws java.lang.IllegalArgumentException,
                       java.lang.IllegalStateException
Adds an item to the end of this array.

Parameters:
item - The name item to add to this array.
Throws:
java.lang.IllegalArgumentException - If the supplied item was not created by the registry that created this array.
java.lang.IllegalStateException - If this object is read-only.

insertElement

void insertElement(int index,
                   IDataObject item)
                   throws java.lang.IllegalArgumentException,
                          java.lang.IllegalStateException,
                          java.lang.IndexOutOfBoundsException
Inserts an item at the specified index in this array.

Parameters:
index - The index to insert the item at.
item - The item to insert into this array.
Throws:
java.lang.IllegalArgumentException - If the supplied item was not created by the registry that created this array.
java.lang.IllegalStateException - If this object is read-only.
java.lang.IndexOutOfBoundsException - If the specified index is less than zero or greater than the length of this array.

setElement

void setElement(int index,
                IDataObject item)
                throws java.lang.IllegalArgumentException,
                       java.lang.IllegalStateException,
                       java.lang.IndexOutOfBoundsException
Sets the item at the specified index in this array.

Parameters:
index - The index to set the item at.
item - The item to set at the specified index in this array.
Throws:
java.lang.IllegalArgumentException - If the supplied item was not created by the registry that created this array.
java.lang.IllegalStateException - If this object is read-only.
java.lang.IndexOutOfBoundsException - If the specified index is less than zero or greater than the length of this array.

removeElement

void removeElement(int index)
                   throws java.lang.IllegalStateException,
                          java.lang.IndexOutOfBoundsException
Removes the item at the specified index in this array.

Parameters:
item - The item to remove from this array.
Throws:
java.lang.IllegalStateException - If this object is read-only.
java.lang.IndexOutOfBoundsException - If the specified index is less than zero or greater than or equal to the length of this array.